package cn.wolfcode.crm.service;

import cn.wolfcode.crm.domain.Client;
import cn.wolfcode.crm.domain.ClientTrace;
import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.ClientQueryObject;
import cn.wolfcode.crm.util.PageResult;
import org.apache.poi.ss.usermodel.Workbook;

import java.util.List;

public interface IClientService {
    void deleteByPrimaryKey(Long id);

    void insert(Client entity);

    void updateByPrimaryKey(Client entity);

    Client selectByPrimaryKey(Long id);

    List<Client> selectAll();

    PageResult query(ClientQueryObject qo);

    /**
     * 将潜在池的客户移交给自己
     *
     * @param clientId
     */
    void join(Long clientId);

    /**
     * 获取所有潜在客户池的数据
     *
     * @return
     */
    List<Client> selectAllPoolClient();

    /**
     * 跟踪操作
     *
     * @param id
     */
    void traced(Long id);

    /**
     * 放入资源池操作
     *
     * @param clientId
     */
    void abandon(Long clientId);

    /**
     * 指派潜在池的客户
     *
     * @param clientId
     * @param salemanId
     */
    void dispatch(Long clientId, Long salemanId);

    /**
     * 移交的数据保存到移交历史
     *
     * @param clientId
     * @param employee
     */
    void transfer(Long clientId, Employee employee);

    //通过状态查询所有正式学员
    List<Client> selectAllStudentOfficial();

    /**
     * 转正操作
     */
    void changeState(Long clientId);

    Workbook exportXls(ClientQueryObject qo);

    void updateSaleMan(ClientTrace clientTrace);
}
